<template>
    <div>
        <div class="yi"><h4>医生列表</h4></div>
        <div class="yi2"><el-input prefix-icon="el-icon-zoom-in" style="width:340px" placeholder="搜索医生"></el-input></div>
        <div class="yi3" v-for="(value,i) in doc_data" :key="i">
            <div></div>
            <div class="yi4" v-for="(time,i) in value.doctor" :key="i">
                <router-link :to="{name:'Docdesc',params:{'id':value.id}}"><el-avatar><img :src="value.img" alt=""></el-avatar></router-link><br>
                <font color="gray" size="2px">解答次数：{{time.answer_num}}</font>
            </div>
            <div class="yi5" v-for="(time,i) in value.doctor" :key="i">
                {{value.name}}&emsp;&emsp;<font color="gray" size="2px">{{value.cong}}</font><br>
                <font color="gray" size="2px">擅长:&emsp;{{time.be_good_at}}</font><br><br>
                <font size="2px">综合评分&emsp;{{time.synth}}</font>&emsp;
                <font size="2px">粉丝数&emsp;{{time.fans_num}}</font>
            </div>
        </div>
    </div> 
</template>

<script>
export default {
    data(){
        return{
            // 医生列表：
            doc_data :[],
        }
    },
    methods:{
        get_doc(){
            this.axios.get('inqu/doctor')
            .then(resp=>{
                console.log(resp)
                this.doc_data = resp.data.dat
            }).catch(err=>{
                console.log(err)
            })
        }
    },
    mounted(){
        this.get_doc();
    }
}
</script>

<style>
    .yi{
        width: 340px;
        height: 50px;
        background-color: orange;
        color:white;
        text-align: center;
        padding-top: 6px;
        border-radius: 10px;
    }
    .yi2{
        margin-top: 10px;
        /* background-color: cadetblue; */
        text-align: left;
    }
    .yi3{
        display: flex;
        justify-content: space-between;
        margin-top: 30px;
        border-bottom: 1px solid gray;
    }
    .yi4{
        width: 100px;
        height: 70px;
        /* background-color: aquamarine; */
        padding-top: 20px;
    }
    .yi5{
        /* margin-left: 30px; */
        width: 280px;
        height: 80px;
        /* background-color: rgb(177, 213, 32); */
        text-align: left;
        padding-left: 20px;
        padding-top: 10px;
    }
</style>